<template> </template>
<script>
export default {
  data() {
    return {
      emp: [{ name: 'Lucy', age: 22, skills: ['Lucy', 'Lily'] }],
    };
  },
  mounted() {
    this.change();
  },
  methods: {
    change() {
      this.emp[0].name = 'lala';
      this.emp[0].skills.push(333);
    },
  },
  watch: {
    emp: {
      handler: (xx) => {
        console.log(xx);
      },
      deep: true, //允许监听内容的变化
    },
  },
};
</script>
